feat(intent-classifier): #961 Phase 2 — classifier-gated plan-critic + research skip#1037
Open
akaszubski wants to merge 1 commit into
Open
feat(intent-classifier): #961 Phase 2 — classifier-gated plan-critic + research skip#1037akaszubski wants to merge 1 commit into
akaszubski wants to merge 1 commit into
Conversation
…+ research skip
New `pipeline_intent_gates.py` exposes two pure-predicate decisions
(`should_skip_web_research`, `should_skip_plan_critic`) that the
/implement coordinator consults at STEP 3.6 (new) and STEP 5.5a.1 (new)
to skip non-floor pipeline steps for low-risk intents.
- Opt-in via INTENT_CLASSIFIER_ENABLED=true (default off; pipeline
byte-identical when unset)
- Web research skip: intent in {config, doc, refactor} >= 0.85
confidence; researcher-local always runs
- Plan-critic skip: intent in {refactor, config, doc, typo} >= 0.85
confidence AND predicted_file_count <= 3; STEP 5.5c structural
validation still always runs
- --strict in ARGUMENTS forces full pipeline regardless of classifier
- Fail-closed: classifier import error, exception, or AMBIGUOUS
returns (False, reason) -> full pipeline runs
pipeline_completion_state.py extended with
record_web_research_skipped / get_web_research_skipped and a
backward-compatible reason kwarg on record_plan_critic_skipped;
get_plan_critic_skipped reads both legacy bool and new dict shape.
Tests: 41 new in tests/unit/test_implement_command_routing.py covering
all 7 acceptance criteria. Coordinator line-cap bumped 575->1650 in
test_implement_command_structure.py.
Validation:
- quality-validator: PASS 8/10 (all ACs met, backward-compat verified)
- security-auditor: PASS (OWASP clean; security_critical excluded
from both skip sets; fail-closed on all failure paths)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
e74df72) intocommands/implement.mdso low-risk intents skipplan-critic(5.5b) and the webresearcher(STEP 4)INTENT_CLASSIFIER_ENABLED=true; default behavior is byte-identical to the pre-feat: Phase 2 — classifier-gated plan-critic + research skip #961 pipelineresearcher-localalways runs, STEP 5.5c structural validation always runs,--strictforces full pipeline, fail-closed on classifier failureFiles
plugins/autonomous-dev/lib/pipeline_intent_gates.py— pure-predicate decision functions (no I/O)tests/unit/test_implement_command_routing.py— 41 tests covering all 7 ACsplugins/autonomous-dev/commands/implement.md— STEP 3.6 (web-research gate) + STEP 5.5a.1 (plan-critic gate)plugins/autonomous-dev/lib/pipeline_completion_state.py—record_web_research_skipped+ extendedrecord_plan_critic_skipped(reason=);get_plan_critic_skippedreads both legacy bool and new dict shape (back-compat)tests/unit/test_implement_command_structure.py— coordinator line-cap bumped 575 → 1650CHANGELOG.md— Unreleased entry under AddedSkip rules
config,doc,refactorrefactor,config,doc,typosecurity_critical,implement,test,ambiguous→ never skip.--strict→ never skip. Classifier exception → never skip.Validation
quality-validator: PASS 8/10 — all 7 ACs met, backward-compat verifiedsecurity-auditor: PASS — OWASP clean;security_criticalexcluded from both skip sets; fail-closed on all failure paths;_truthystrict env-var parse;arguments.split()token-based--strictdetectionCloses #961.
Test plan
pytest tests/unit/test_implement_command_routing.py tests/unit/test_implement_command_structure.py tests/unit/lib/test_pipeline_completion_state.py)INTENT_CLASSIFIER_ENABLEDunset/false → both gates return(False, "disabled"))--strictoverride verifiedINTENT_CLASSIFIER_ENABLED=trueagainst a real low-risk issue (post-merge follow-up)🤖 Generated with Claude Code